cmake_minimum_required(VERSION 2.8)
IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE Release)
ENDIF()
set(SRC_LISTS test_vision_landing.cpp aruco.cpp charuco.cpp dictionary.cpp predefined_dictionaries.cpp fisheye.cpp ini.c INIReader.cpp visionLanding.cpp)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -Wall  -O0 -g -march=native ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O0  -g -march=native")
set(ORB_SLAM2_DIR /home/ubuntu/vision/libs/ORB_SLAM2-master/)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions(-DCOMPILEDWITHC11)

find_package(Pangolin REQUIRED)


include_directories(
${ORB_SLAM2_DIR}
${ORB_SLAM2_DIR}/include
/usr/include
/usr/include/eigen3
)
link_directories(
${ORB_SLAM2_DIR}/lib
${ORB_SLAM2_DIR}/Thirdparty/DBoW2/lib
${ORB_SLAM2_DIR}/Thirdparty/g2o/lib
)


find_package( OpenCV REQUIRED PATHS "/home/isee/Downloads/software/opencv-2.4.9/build_release")
#add_definitions(-DCPU_ONLY)
#include_directories(/home/isee/Documents/project/xunyi/caffe-master/distribute/include)
#link_directories(/home/isee/Documents/project/xunyi/caffe-master/distribute/lib)
#link_directories(/usr/lib/x86_64-linux-gnu)

#add_executable( test_xunyi ${SRC_LISTS}  )
add_executable( test_slam ${SRC_LISTS}  )
#add_library(${PROJECT_NAME} SHARED ${SRC_LISTS})
#set(LIBRARY_OUTPUT_PATH ../lib)
target_link_libraries(
${PROJECT_NAME}  
${OpenCV_LIBS} 
${Pangolin_LIBRARIES}
ORB_SLAM2 
g2o 
DBoW2)

#target_link_libraries( test_xunyi ${OpenCV_LIBS} caffe glog boost_system)
#target_link_libraries( test_xunyi ${OpenCV_LIBS})
